﻿using HPIT.RentHouse.Common;
using HPIT.RentHouse.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HPIT.RentHouse.IService
{
    public interface IPermissionsService:IServiceSupport
    {
        List<PermissionDTO> GetList();

        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="start"></param>
        /// <param name="length"></param>
        /// <param name="name"></param>
        /// <param name="count"></param>
        /// <returns></returns>
        List<PermissionDTO> GetPageList(int start, int length, string name, ref int count);

        /// <summary>
        /// 添加权限
        /// </summary>
        /// <param name="permissionDTO"></param>
        /// <returns></returns>
        AjaxResult Add(PermissionDTO permissionDTO);

        /// <summary>
        /// 根据id获取权限
        /// </summary>
        /// <param name="id">权限id</param>
        /// <returns></returns>
        PermissionDTO Get(long id);

        /// <summary>
        /// 修改权限
        /// </summary>
        /// <param name="permissionDTO"></param>
        /// <returns></returns>
        AjaxResult Update(PermissionDTO permissionDTO);

        /// <summary>
        /// 删除权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AjaxResult Delete(long id);

        /// <summary>
        /// 批量删除权限
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        AjaxResult DeleteBatch(List<long> ids);

        /// <summary>
        /// 获取用户权限
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        List<PermissionDTO> GetListByUser(long userId);
    }
}
